home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #6
/
Amiga Plus CD - 2004 - No. 06.iso
/
AmigaPlus
/
Begleitmaterial
/
50Tools
/
Grafik
/
PerfectPaint
/
rexx
/
box
/
Button.rx
< prev
next >
Wrap
Text File
|
2002-10-28
|
2KB
|
106 lines
/*
Button.rx by Saint
(box Script)
V1.0
*/
options results
parse ARG Port x1 y1 x2 y2 b
ADDRESS COMMAND
Press=0
Size=4
IF EXISTS('PerfectPaint:Prefs/Rexx_Prefs/button') THEN DO
IF OPEN('lfile','PerfectPaint:Prefs/Rexx_Prefs/button', "R") then DO
Size= READLN('lfile')
Press= READLN('lfile')
CALL CLOSE('lfile')
END
END
ADDRESS Value Port
pp_DialogInit 140 75 "*Button*" 2
pp_Integer 0 80 5 35 20 "Bevel*Size" 1 Size
pp_Checkbox 1 80 27 50 16 "Pressed" 0 Press
pp_Dialog
rc=result
IF rc=0 then DO
EXIT
END
pp_GetDialog 0
Size=result
pp_GetDialog 1
Press=result
pp_Updateundobox x1 y1 x2 y2
pp_clearrange 0
pp_EffectOn
pp_ComposeReqOff
if Press=1 then DO
a=3
b=1
END
ELSE DO
a=1
b=3
END
PP_Gradient 0 1 /*Vertical*/
pp_SetRange 0 0 64 64 64
pp_setRange 0 19 0 0 0
pp_compose a 100 /*Add*/
pp_ComposeReq off
pp_boxF x1 y1 x2 y1+size /*Oben*/
PP_Gradient 0 0 /*Horizontal*/
pp_BoxF x1 y1 x1+size y2 /*Links*/
PP_Gradient 0 1
pp_SetRange 0 0 0 0 0
pp_setRange 0 19 64 64 64 /*Invert Range*/
pp_Compose b 100 /*Sub*/
pp_BoxF x1 y2 x2 y2-size /*Unten*/
PP_Gradient 0 0 /*Horizontal*/
pp_BoxF x2 y1 x2-size y2 /*Rechts*/
/*Restore old*/
pp_ClearRange 0
pp_EffectOff
pp_ComposeReqOn
pp_Compose 0 100
saveprefs("button",size,press)
exit
SavePrefs: PROCEDURE
Prefname='PerfectPaint:Prefs/Rexx_Prefs/'||ARG(1)
say prefname
if EXISTS(Prefname) THEN DO
ADDRESS COMMAND
'delete >nil: '||Prefname
END
IF OPEN('pfile',PrefName,'W') THEN DO
do i=2 to ARG()
CALL WRITELN('pfile',ARG(i))
end
CALL CLOSE('pfile')
RETURN
==
--
Markus Castro <Markus@Amigafuture.de> (Y)
________ ____ _ __ (°-°)
/_ __/ / ___ / __/__ _(_)__ / /_ Amiga Aktuell Autor ()-,-()--<{@
/ / / _ \/ -_)\ \/ _ `/ / _ \/ __/ (_)-(_)
/_/ /_//_/\__/___/\_,_/_/_//_/\__/ AmigaFuture Autor